<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateFeedbackTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('feedback', function (Blueprint $table) {
            $table->increments('id');
            $table->string('user_phone',13)->notNull()->comment('用户手机号');
            $table->string('content',301)->notNull()->comment('内容');
            $table->string('contact',13)->comment('联系方式');
            $table->tinyInteger('client')->notNull()->comment('客户端：1：Android；2：IOS');
            $table->string('version',20)->comment('版本');
            $table->tinyInteger('status')->default(1)->comment('状态：1未读；2已读');
            $table->timestamp('timestp')->default(\DB::raw('CURRENT_TIMESTAMP'))->comment('反馈时间');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('feedback');
    }
}
